package edu.whu.demo.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.persistence.Entity;

@Data
@AllArgsConstructor
@TableName(value = "items")
@NoArgsConstructor
public class Item {
    @TableId(type = IdType.AUTO)
    private Long id;

    String name;

    long count;

    long price;

    public boolean surplus(){return this.getCount()>0;};

}
